package com.shujujiegou.栈.利用栈实现字符串逆序;

import com.shujujiegou.栈.增强栈的实现.ArrayStack;
import org.springframework.util.StringUtils;

public class Test {
    public static void main(String[] args) {
        ArrayStack arrayStack = new ArrayStack();
        String str = "hello word!";
        char cha[] = str.toCharArray();
        for(char c : cha) {
            arrayStack.push(c);
        }

        while (!arrayStack.isEmpty()) {
            System.out.println(arrayStack.pop());
        }
    }
}
